var app = layui.app;

var obj = {
    a: 1,
    b: {
        c: 0
    },
    d: [1, 2, 3, 4, 5],
    ff: 1,
    html: `<p>我的html</p>`
}

obj.e = "asd"

var data = app.proxy(obj);

function add() {
    data.b.c++
}

function ffadd() {
    data.ff++
}

app.onMount = function () {
    console.log("home挂载")
}

app.beforeUpdate = function () {
    console.log("home渲染前")
}

app.afterUpdate = function (bind) {
    console.log("home渲染后")

    bind.find(".add").click(function () {
        add()
    })
    
}

app.onDestroy = function () {
    console.log("home卸载了")
}